package com.aracky.assess.mapper;

import com.aracky.assess.model.entity.HrKpiUserAssessorConfig;
import com.aracky.assess.model.request.HrKpiUserAssessorConfigRequest;
import com.aracky.assess.model.vo.HrKpiUserAssessorConfigPageListVo;
import com.aracky.assess.model.vo.HrKpiUserAssessorConfigVO;
import com.aracky.assess.model.vo.UserAndAssessorConfigDetailVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 考核关系配置表 Mapper 接口
 * </p>
 *
 * @author zzp
 * @since 2022-08-01 09:43:18
 */
@Mapper
public interface HrKpiUserAssessorConfigMapper extends BaseMapper<HrKpiUserAssessorConfig> {
    /**
     * 查询列表
     * @param topage
     * @param hrKpiUserAssessorConfigRequest
     * @return
     */
    IPage<HrKpiUserAssessorConfigVO> findHrKpiUserAssessorConfig(Page topage, @Param("hkuac") HrKpiUserAssessorConfigRequest hrKpiUserAssessorConfigRequest);

    /**
     * 分页查询出员工考核列表信息
     * @param topage
     * @param hrKpiUserAssessorConfigRequest
     * @return
     */
    IPage<HrKpiUserAssessorConfigPageListVo> selectPageList(Page topage , @Param("hkuac") HrKpiUserAssessorConfigRequest hrKpiUserAssessorConfigRequest);

    /**
     * 根据id，查询员工考核关系信息
     * @param id
     * @return
     */
    HrKpiUserAssessorConfigPageListVo selectMyById(@Param("id") Long id);

    /**
     * 分页查询员工和考核关系详情信息
     * @param toPage
     * @return
     */
    IPage<UserAndAssessorConfigDetailVo> selectPageUserAndAssessorConfigDetail(Page toPage);

    /**
     * 根据userId查询考核关系信息
     * @param userId
     * @return
     */
    HrKpiUserAssessorConfigPageListVo selectByUserId(@Param("userId") Long userId);

    /**
     * 根据指定的id去修改岗位考核关系配置信息
     * @param hrKpiUserAssessorConfig
     * @return
     */
    Integer myUpdateById(@Param("hkuac") HrKpiUserAssessorConfig hrKpiUserAssessorConfig);
}
